package com.eapi.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eapi.project.mapper.LikerecordMapper;
import com.eapi.project.model.entity.Likerecord;
import com.eapi.project.service.LikerecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author lenovo
* @description 针对表【likerecord(点赞记录表)】的数据库操作Service实现
* @createDate 2024-04-06 11:47:40
*/
@Service
public class LikerecordServiceImpl extends ServiceImpl<LikerecordMapper, Likerecord>
    implements LikerecordService {
    @Autowired
    public LikerecordMapper likerecordMapper;
    @Override
    public boolean deleteLikeRecord(Long id) {
        UpdateWrapper updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("id",id);
        updateWrapper.setSql("delete from likerecord");
        boolean deleteResult = this.update(updateWrapper);
        return deleteResult;
    }
}




